<?php 
namespace Common\Service; 

use Common\Util\UserUtils;
use Common\Model\ProjectModel;
use Common\Model\ReturnListModel;
/**
 * 礼品接口
 * @author liuyang 
 * @version v2.0
 *  
 */
class PrizeService {
	   
    /**
     * 通过点亮的子活动分类插入对应的项目、现金券、客妆
     */
	 public static function addPrize($subActList,$orderObj,$customerId,$subActAllList){
	         //先将子活动的礼品分类存放
	         UserUtils::addSubActTypes($subActList); 
	         //添加默认自己点亮子活动对应的项目
	         if(count(UserUtils::getProjectSubAct())>0){
	             (new ProjectModel())->addProjects(UserUtils::getProjectSubAct(),$customerId,$orderObj,$subActAllList);
	         }
	         //添加默认自己点亮获得的现金券
	         if(count(UserUtils::getCashCouponSubAct())>0){
	             (new ReturnListModel())->addList(UserUtils::getCashCouponSubAct(), $customerId, $orderObj);
	         }
	 }
	 
}